//
//  RootTabbarController.swift
//  QHEntry-Exit
//
//  Created by Groot on 2017/4/26.
//  Copyright © 2017年 Groot. All rights reserved.
//

import UIKit

class RootTabbarController: UITabBarController, UITabBarControllerDelegate {

    public static let kBadgeNumberChanged = "kBadgeNumberChanged"
    
    let titles: [String] = ["运动", "赛事", "朋友圈", "发现", "我的"]
    let images: [String] = ["sport", "game", "friends", "find", "mine"]
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.delegate = self
        self.tabBar.tintColor = DefaultColor.tint
        for index in 0 ..< self.viewControllers!.count {
            let item0 = UITabBarItem(title:titles[index], image: UIImage(named: "footer_\(images[index])_normal"), selectedImage: UIImage(named: "footer_\(images[index])_checked"))
            item0.tag = index
            self.viewControllers?[index].tabBarItem = item0
        }
    }
}

